import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class ICO {
  static icon(String name, {Color? color, double size = 16}) {
    return Image.asset('assets/images/$name.png',
        color: color, width: size, height: size);
  }

  static svg(String name,
      {Color? color, double size = 16, double? width, double? height}) {
    return SvgPicture.asset('assets/svgs/$name.svg',
        width: width ?? size,
        height: height ?? size,
        colorFilter: ColorFilter.mode(color!, BlendMode.srcIn),
        allowDrawingOutsideViewBox: true);
  }
}
